package com.oocl.handlebatchdata.run;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;

import com.oocl.handlebatchdata.comparator.BirthdayComparator;
import com.oocl.handlebatchdata.comparator.IdComparator;
import com.oocl.handlebatchdata.customer.Customer;
import com.oocl.handlebatchdata.dataprocess.DataProcessImpl;
import com.oocl.handlebatchdata.formatptint.FormatPrinter;

public class Run {


	public static void main(String[] args) throws FileNotFoundException {
		
		Set<Customer> cs1=new TreeSet<Customer>(new IdComparator());
		Set<Customer> cs2=new TreeSet<Customer>(new BirthdayComparator());
		DataProcessImpl dpi =new DataProcessImpl(cs1, cs2);
		dpi.setdata();
		System.out.println("按ID");
		FormatPrinter.printCustomer(cs1);
		System.out.println("按生日");
		FormatPrinter.printCustomer(cs2);
		System.out.println("按ID");
		FormatPrinter.printCustomerXml(cs1);
	}	
}
